﻿<!DOCTYPE html>
<!--HTML5 doctype-->
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<title>留言反馈 - {site.name}</title>
<meta content="{site.seo_keyword}" name="keywords" />
<meta content="{site.seo_description}" name="description" />
<link rel="stylesheet" type="text/css" href="<%templateskin="mobile"%>/css/validate.css" />
<link rel="stylesheet" type="text/css" href="<%templateskin="mobile"%>/css/style.css" />
<script type="text/javascript" charset="utf-8" src="<%templateskin="mobile"%>/js/zepto.min.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin="mobile"%>/js/weui.min.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin="mobile"%>/js/common.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin="mobile"%>/js/mvalidate.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin="mobile"%>/js/mvalidate-extend.js"></script>
<script type="text/javascript">
$(function(){
	//初始化发表留言表单
	AjaxInitForm('#feedbackForm', '#btnSubmit', 1);
});
</script>
</head>

<body ontouchstart>
<div class="page">
    <!--页面头部-->
    <div class="header">
        <a class="back" href="javascript:history.back();">
            <i class="iconfont icon-arrow-left"></i>
        </a>
        <h3>留言反馈</h3>
        <div class="right"> 
            <a class="weui-cell_access weui-cell_link" href="<%linkurl("index")%>">
                <i class="iconfont icon-home"></i>
            </a>
        </div>
    </div>
    <!--/页面头部-->
  
    <!--页面内容-->
    <div class="page__bd">
        
        <!--留言列表-->
        <div class="weui-panel weui-panel_access" style="margin-top:10px;">
            <div class="weui-panel__hd">留言列表</div>
            <div class="weui-panel__bd">
                <div class="comment-box">
                    <ol class="comment-list">
                        <%set DataTable feedbackList=new DTcms.Web.Plugin.Feedback.feedback().get_feedback_list(10, page, "", out totalcount)%>
                        <%set string pagelist=get_page_link(10, page, totalcount, "feedback", "__id__")%>
                        <%foreach(DataRow dr in feedbackList.Rows)%>
                        <li>
                            <div class="avatar">
                                <i class="iconfont icon-user-full"></i>
                            </div>
                            <div class="inner">
                                <div class="meta">
                                    <span class="blue">{dr[user_name]}</span>
                                    <span class="time">{dr[add_time]}</span>
                                </div>
                                <p>{dr[content]}</p>
                            </div>
                            
                            <%if({dr[reply_content]}!="")%>
                            <div class="answer">
                                <div class="meta">
                                    <span class="time">{dr[reply_time]}</span>
                                    <span class="blue">管理员回复：</span>
                                </div>
                                <p>{dr[reply_content]}</p>
                            </div>
                            <%/if%>
                        </li>
                        <%/foreach%>
                        <%if(totalcount==0)%>
                        <div class="nodata" style="border:none;">暂无留言...</div>
                        <%/if%>
                    </ol>
                </div>
                
            </div>
        </div>
        <!--/留言列表-->
        
        <!--分页页码-->
        <div class="page-list">
            {pagelist}
        </div>
        <!--/分页页码-->
        
        <!--发表留言-->
        <form id="feedbackForm" name="feedbackForm" class="form-box" url="{config.webpath}plugins/feedback/ajax.ashx?action=add&site={site.id}">
        <div class="weui-panel weui-panel_access">
            <div class="weui-panel__hd">发表留言</div>
            <div class="weui-panel__bd">
                <div class="weui-cells_form form-box">
                    
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <label class="weui-label">用户昵称</label>
                        </div>
                        <div class="weui-cell__bd">
                            <input id="txtUserName" name="txtUserName" class="weui-input" type="text" placeholder="请输入昵称" data-validate="s" />
                        </div>
                    </div>
                    
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <label class="weui-label">联系电话</label>
                        </div>
                        <div class="weui-cell__bd">
                            <input id="txtUserTel" name="txtUserTel" class="weui-input" type="tel" placeholder="联系电话，非必填" />
                        </div>
                    </div>
                    
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <label class="weui-label">QQ号码</label>
                        </div>
                        <div class="weui-cell__bd">
                            <input id="txtUserQQ" name="txtUserQQ" class="weui-input" type="text" placeholder="QQ号码，非必填" />
                        </div>
                    </div>
                    
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <label class="weui-label">电子邮箱</label>
                        </div>
                        <div class="weui-cell__bd">
                            <input id="txtUserEmail" name="txtUserEmail" class="weui-input" type="text" placeholder="邮箱地址，非必填" />
                        </div>
                    </div>
                    
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <label class="weui-label">留言标题</label>
                        </div>
                        <div class="weui-cell__bd">
                            <input id="txtTitle" name="txtTitle" class="weui-input" type="text" placeholder="请输入留言标题" data-validate="s" />
                        </div>
                    </div>
                    
                    <div class="weui-cell">
                        <div class="weui-cell__bd">
                            <textarea id="txtContent" name="txtContent" class="weui-textarea" placeholder="请输入留言内容" rows="3" data-validate="comment"></textarea>
                        </div>
                    </div>
                    
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <label class="weui-label">验证码</label>
                        </div>
                        <div class="weui-cell__bd">
                            <input id="txtCode" name="txtCode" class="weui-input" type="text" placeholder="请输入验证码" data-validate="code" />
                        </div>
                        <div class="weui-cell__ft">
                            <a href="javascript:;" onclick="ToggleCode(this, '{config.webpath}tools/verify_code.ashx');return false;">
                            <img class="weui-vcode-img" src="{config.webpath}tools/verify_code.ashx" style="width:82px;height:24px;" />
                            </a>
                        </div>
                    </div>
                    
                </div>
                
            </div>
        </div>
        <div class="weui-btn-area">
            <input id="btnSubmit" name="btnSubmit" type="submit" class="weui-btn weui-btn_primary" value="发表留言" />
        </div>
        </form>
        <!--/发表留言-->
    
        <!--版权信息-->
        <%template skin="mobile" src="_copyright.html"%>
        <!--/版权信息-->

        <!--底部导航-->
        <%template skin="mobile" src="_footer.html"%>
        <!--/底部导航-->
    
  </div>
  <!--/页面内容-->

</div>
</body>
</html>
